﻿//GB/Z 29014.3 ISYC 307-09-多排可转位刀片柄连接中心切削立铣刀

using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Text;
using netDxf;
using netDxf.Blocks;
using netDxf.Collections;
using netDxf.Entities;
using netDxf.Header;
using netDxf.Objects;
using netDxf.Tables;
using netDxf.Units;
using Attribute = netDxf.Entities.Attribute;
using Image = netDxf.Entities.Image;
using Point = netDxf.Entities.Point;
using Trace = netDxf.Entities.Trace;
using System.Threading;

namespace TestDxfDocument
{
    class ISYC_307_09_F77
    {
        public static void ISYC_307_F77_H(Dictionary<string, Object> data)
        {
            DxfDocument dxf = new DxfDocument();
            //图层
            Layer contour = new Layer("contour") { Color = AciColor.Cyan };    //轮廓层
            Layer dimensioning = new Layer("dimensioning");    //尺寸层
            Layer refin = new Layer("refin") { Color = AciColor.Red };    //基准线/内轮廓
            Layer centre = new Layer("centre") { Color = AciColor.Yellow };    //中性线
            Layer textlayer = new Layer("textlayer") { Color = AciColor.Blue };    //文本层
            Layer hatching = new Layer("hatching") { Color = AciColor.Blue };    //填充层
            Layer additionalline = new Layer("additionalline") { Color = AciColor.Cyan };    //附加线
            Layer cutting = new Layer("cutting") { Color = AciColor.Red };    //切削层
            Layer nocutting = new Layer("nocutting");    //非切削层
            Layer skcontour = new Layer("skcontour") { Color = AciColor.Cyan };    //sk轮廓层
            Layer skdimensioning = new Layer("skdimensioning");    //sk尺寸线层
            Layer skrefin = new Layer("skrefin") { Color = AciColor.Red };    //sk基准线/内轮廓
            Layer sktext = new Layer("sktext") { Color = AciColor.Blue };  //sk文本
            Layer skhatching = new Layer("skhatching") { Color = AciColor.Blue };    //sk填充
            Layer skadditionlline = new Layer("skadditionlline") { Color = AciColor.Cyan };    //sk附加线
            Layer skviewcontour = new Layer("skviewcontour") { Color = AciColor.Cyan };    //skview轮廓
            Layer skviewdimensioning = new Layer("skviewdimensioning");    //skview尺寸线层

            //基本参数-------------------------------------------------------------------------------------------------
            double pi = Math.PI;
            string path = Convert.ToString(data["path"]);

            //赋值参数--------------------------------------------------------------------------------------------------
            double scale = 1;
            double OAL = 43.65 * scale;
            double LPR = 26.81 * scale;
            double APMX = 15.36 * scale;
            double DC = 9.21 * scale;
            double LF = 33.26 * scale;
            double LU = 18.96 * scale;
            double BD = 8.45 * scale;
            double DCONMS = 8.29 * scale;
            double LS = 20.38 * scale;
            double DN = 5.46 * scale;
            double KAPR = 90;

            //点---------------------------------------------------------------------------------------------
            //第一部分
            //轮廓
            Vector2 v1 = new Vector2(0, 0);
            Vector2 v2 = new Vector2(v1.X + OAL, v1.Y);
            Vector2 v4 = new Vector2(v1.X + (0.43 / 20.38) * LS, v1.Y + DCONMS / 2.0);
            Vector2 v3 = fun.Inters(v1, fun.Polar(v1, 90 * pi / 180, DCONMS), v4, fun.Polar(v4, -135 * pi / 180, OAL));
            Vector2 v5 = new Vector2(v3.X + LS, v4.Y);
            Vector2 v6 = new Vector2(v5.X + (0.82 / 20.38) * LS, v5.Y - (1.42 / 9.21) * DC);
            Vector2 v7 = new Vector2(v6.X + (6.44 / 18.96) * LU, v6.Y);
            Vector2 v8 = new Vector2(v7.X, v7.Y + (1.54 / 9.21) * DC);
            Vector2 v9 = new Vector2(v8.X + (3.19 / 18.96) * LU, v8.Y);
            Vector2 v10 = new Vector2(v9.X, v2.Y + DC / 2.0);
            Vector2 v11 = new Vector2(v10.X + (3.95 / 18.96) * LU, v10.Y);
            Vector2 v12 = new Vector2(v11.X, v11.Y - (2.65 / 9.21) * DC);
            Vector2 v13 = new Vector2(v10.X, v12.Y);
            Vector2 v14 = fun.Inters(v9, fun.Polar(v9, 0, OAL), v11, v12);
            Vector2 v15 = new Vector2(v14.X + (2.49 / 18.93) * LU, v14.Y);
            Vector2 v16 = new Vector2(v1.X + OAL, v1.Y + DC / 2.0);
            Vector2 v17 = new Vector2(v15.X, v16.Y);
            Vector2 v18 = new Vector2(v17.X, v17.Y - (3.95 / 9.21) * DC);
            Vector2 v19 = new Vector2(v16.X, v18.Y);
            Vector2 v20 = new Vector2(v19.X - (0.5 / 18.96) * LU, v19.Y);
            Vector2 v21 = new Vector2(v20.X, v2.Y - BD / 4.0);
            Vector2 v22 = new Vector2(v8.X, -v8.Y);
            Vector2 v23 = new Vector2(v7.X, -v7.Y);
            Vector2 v24 = new Vector2(v6.X, -v6.Y);
            Vector2 v25 = new Vector2(v5.X, -v5.Y);
            Vector2 v26 = new Vector2(v4.X, -v4.Y);
            Vector2 v27 = new Vector2(v3.X, -v3.Y);
            Vector2 v28 = fun.Inters(v10, v12, v11, v13);
            Vector2 v29 = fun.Inters(v17, v19, v16, v18);
            Vector2 v30 = new Vector2(v20.X, -v20.Y);
            Vector2 v31 = new Vector2(v19.X, -v19.Y);
            Vector2 v32 = new Vector2(v16.X, v21.Y - (DC - BD) / 2.0);
            Vector2 v33 = new Vector2(v32.X - (5.62 / 15.36) * APMX, v32.Y);
            Vector2 v34 = new Vector2(v33.X, v21.Y);
            Vector2 v35 = new Vector2(v34.X - (0.79 / 15.36) * APMX, -v15.Y);
            Vector2 v21_1 = new Vector2(v34.X - Math.Abs(v34.X - v35.X) / 2.0, v21.Y);
            Vector2 v21_2 = new Vector2(v34.X - Math.Abs(v34.X - v35.X) / 2.0, -v15.Y);
            Vector2 v36 = new Vector2(v33.X - (0.79 / 15.36) * APMX, v35.Y - (DC - BD) / 2.0);
            Vector2 v37 = new Vector2(v36.X - (3.87 / 15.36) * APMX, v36.Y);
            Vector2 v38 = new Vector2(v37.X, v35.Y);
            Vector2 v39 = new Vector2(v38.X - (1.22 / 15.36) * APMX, v38.Y);
            Vector2 v62 = new Vector2(v39.X, v37.Y);
            Vector2 v63 = new Vector2(v62.X - (3.87 / 15.36) * APMX, v62.Y);
            Vector2 v64 = new Vector2(v63.X, v35.Y);
            Vector2 v65 = new Vector2(v2.X - LF, v1.Y);
            Vector2 v66 = new Vector2(v65.X - (3.52 / 20.38) * LS, v65.Y + (2.87 / 8.29) * DCONMS);
            Vector2 v67 = new Vector2(v65.X + (3.52 / 20.38) * LS, v65.Y + (2.87 / 8.29) * DCONMS);
            Vector2 v68 = new Vector2(v67.X, -v67.Y);
            Vector2 v69 = new Vector2(v66.X, -v66.Y);
            Vector2 v26_1 = new Vector2(v26.X - (3.33 / 20.38) * LS, v26.Y - (5.91 / 8.29) * DCONMS);
            Vector2 v70 = new Vector2(v65.X + (0.92 / 8.29) * DCONMS, v65.Y + (9.54 / 20.38) * LS);
            Vector2 v71 = new Vector2(v70.X + (3.29 / 20.38) * LS, v70.Y);
            Vector2 v72 = new Vector2(v2.X - LPR, v71.Y - (1.49 / 8.29) * LS);
            Vector2 v73 = new Vector2(v72.X, -v72.Y);
            Vector2 v74 = new Vector2(v71.X, -v71.Y);
            Vector2 v75 = new Vector2(v70.X, -v70.Y);
            Vector2 v16_1 = new Vector2(v16.X + (8.09 / 43.65) * OAL, v16.Y + (14.13 / 9.21) * DC);
            Vector2 v4_1 = new Vector2(v4.X + (9.47 / 20.38) * LS, v4.Y);
            Vector2 v10_1 = new Vector2(v10.X + (0.39 / 18.96) * LU, v10.Y - (0.26 / 9.21) * DC);
            Vector2 v11_1 = new Vector2(v11.X - (0.39 / 18.96) * LU, v11.Y - (0.26 / 9.21) * DC);
            Vector2 v12_1 = new Vector2(v12.X - (0.39 / 18.96) * LU, v12.Y + (0.26 / 9.21) * DC);
            Vector2 v13_1 = new Vector2(v13.X + (0.39 / 18.96) * LU, v13.Y + (0.26 / 9.21) * DC);
            Vector2 v17_1 = new Vector2(v17.X + (0.69 / 18.96) * LU, v17.Y - (0.43 / 9.21) * DC);
            Vector2 v18_1 = new Vector2(v18.X + (0.69 / 18.96) * LU, v18.Y + (0.43 / 9.21) * DC);
            Vector2 v19_1 = new Vector2(v19.X - (0.69 / 18.96) * LU, v19.Y + (0.43 / 9.21) * DC);
            Vector2 v16_2 = new Vector2(v16.X - (0.69 / 18.96) * LU, v16.Y - (0.43 / 9.21) * DC);
            Vector2 v73_1 = new Vector2(v6.X + (2.33 / 18.96) * LU, v6.Y);
            Vector2 v2_1 = new Vector2(v20.X, v2.Y);
            Vector2 v76 = new Vector2(v2.X + (18 / 43.65) * OAL, v2.Y);

            //第二部分
            //轮廓
            Vector2 v40 = new Vector2(v2.X + (30 / 41.57) * OAL, v2.Y);
            Vector2 v41 = new Vector2(v40.X + BD * 1.2, v40.Y);
            Vector2 v42 = new Vector2(v40.X + (fun.CalDistance(v40, v41) / 2.0), v40.Y);
            Vector2 v43 = fun.Inters1(v2, fun.Polar(v2, 0.0001 * pi / 180, OAL), new Arc(v42, BD / 2.0, 0, 360), 0);
            Vector2 v44 = new Vector2(v42.X, v42.Y + DC / 2.0);
            Vector2 v45 = new Vector2(v42.X + (0.86 / 13.05) * DC, v16_2.Y);
            Vector2 v45_1 = new Vector2(v45.X, v19_1.Y);
            Vector2 v44_1 = fun.Inters(v45_1, fun.Polar(v45_1, -147 * pi / 180, OAL), v40, v41);
            Vector2 v46 = fun.Inters(v44, fun.Polar(v44, -90 * pi / 180, OAL), v44_1, v45_1);
            Vector2 v47 = new Vector2(v44.X, v44.Y - (2.54 / 13.05) * DC);
            Vector2 v48 = new Vector2(v47.X, v9.Y);
            Vector2 v49 = fun.Inters(v48, fun.Polar(v48, 21 * pi / 180, OAL), v45, fun.Polar(v45, -90 * pi / 180, OAL));
            Vector2 v50 = new Vector2(v44.X, -v44.Y);
            Vector2 v51 = fun.rotatePoint_Changed(v42, v45, 180);
            Vector2 v52 = fun.rotatePoint_Changed(v42, v45_1, 180);
            Vector2 v53 = fun.rotatePoint_Changed(v42, v44_1, 180);
            Vector2 v54 = fun.rotatePoint_Changed(v42, v43, 180);
            Vector2 v55 = fun.rotatePoint_Changed(v42, v47, 180);
            Vector2 v56 = fun.rotatePoint_Changed(v42, v49, 180);
            Vector2 v57 = fun.rotatePoint_Changed(v42, v48, 180);
            Vector2 v58 = fun.getPointForArcandLine(v52, v51, v42, new Arc(v42, BD / 2.0, 0, 360));
            Vector2 v59 = new Vector2(v50.X, v42.Y - BD / 2.0);
            Vector2 v60 = fun.rotatePoint_Changed(v42, v59, 180);
            Vector2 v61 = fun.rotatePoint_Changed(v42, v58, 180);
            Vector2 v46_1 = fun.rotatePoint_Changed(v42, v46, 180);

            //作图部分-----------------------------------------------------------------------
            //中心线
            Line line1 = new Line(v1, v2);
            line1.Layer = centre;
            line1.Linetype = Linetype.Center;
            line1.LinetypeScale = 5;
            dxf.AddEntity(line1);

            Line line2 = new Line(v40, v41);
            line2.Layer = centre;
            line2.Linetype = Linetype.Center;
            line2.LinetypeScale = 5;
            dxf.AddEntity(line2);

            Line line3 = new Line(v44, v50);
            line3.Layer = centre;
            line3.Linetype = Linetype.Center;
            line3.LinetypeScale = 5;
            dxf.AddEntity(line3);

            //第一部分
            //轮廓
            LwPolyline polyline1 = new LwPolyline();
            polyline1.Vertexes.Add(new LwPolylineVertex(v1));
            polyline1.Vertexes.Add(new LwPolylineVertex(v3));
            polyline1.Vertexes.Add(new LwPolylineVertex(v4));
            polyline1.Vertexes.Add(new LwPolylineVertex(v5));
            polyline1.Vertexes.Add(new LwPolylineVertex(v6));
            polyline1.Vertexes.Add(new LwPolylineVertex(v7));
            polyline1.Vertexes.Add(new LwPolylineVertex(v8));
            polyline1.Vertexes.Add(new LwPolylineVertex(v9));
            fun.PolyFill(dxf, polyline1, 0.3, contour);

            LwPolyline polyline2 = new LwPolyline();
            polyline2.Vertexes.Add(new LwPolylineVertex(v10));
            polyline2.Vertexes.Add(new LwPolylineVertex(v11));
            polyline2.Vertexes.Add(new LwPolylineVertex(v12));
            polyline2.Vertexes.Add(new LwPolylineVertex(v13));
            polyline2.Vertexes.Add(new LwPolylineVertex(v10));
            fun.PolyFill(dxf, polyline2, 0.3, contour);

            LwPolyline polyline3 = new LwPolyline();
            polyline3.Vertexes.Add(new LwPolylineVertex(v16));
            polyline3.Vertexes.Add(new LwPolylineVertex(v17));
            polyline3.Vertexes.Add(new LwPolylineVertex(v18));
            polyline3.Vertexes.Add(new LwPolylineVertex(v19));
            polyline3.Vertexes.Add(new LwPolylineVertex(v16));
            fun.PolyFill(dxf, polyline3, 0.3, contour);

            LwPolyline polyline4 = new LwPolyline();
            polyline4.Vertexes.Add(new LwPolylineVertex(v10_1));
            polyline4.Vertexes.Add(new LwPolylineVertex(v11_1));
            polyline4.Vertexes.Add(new LwPolylineVertex(v12_1));
            polyline4.Vertexes.Add(new LwPolylineVertex(v13_1));
            polyline4.Vertexes.Add(new LwPolylineVertex(v10_1));
            fun.PolyFill(dxf, polyline4, 0.3, contour);

            LwPolyline polyline5 = new LwPolyline();
            polyline5.Vertexes.Add(new LwPolylineVertex(v16_2));
            polyline5.Vertexes.Add(new LwPolylineVertex(v17_1));
            polyline5.Vertexes.Add(new LwPolylineVertex(v18_1));
            polyline5.Vertexes.Add(new LwPolylineVertex(v19_1));
            polyline5.Vertexes.Add(new LwPolylineVertex(v16_2));
            fun.PolyFill(dxf, polyline5, 0.3, contour);

            LwPolyline polyline6 = new LwPolyline();
            polyline6.Vertexes.Add(new LwPolylineVertex(v20));
            polyline6.Vertexes.Add(new LwPolylineVertex(v21));
            polyline6.Vertexes.Add(new LwPolylineVertex(v21_1));
            polyline6.Vertexes.Add(new LwPolylineVertex(v21_2));
            polyline6.Vertexes.Add(new LwPolylineVertex(v22));
            polyline6.Vertexes.Add(new LwPolylineVertex(v23));
            polyline6.Vertexes.Add(new LwPolylineVertex(v24));
            polyline6.Vertexes.Add(new LwPolylineVertex(v25));
            polyline6.Vertexes.Add(new LwPolylineVertex(v26));
            polyline6.Vertexes.Add(new LwPolylineVertex(v27));
            polyline6.Vertexes.Add(new LwPolylineVertex(v1));
            fun.PolyFill(dxf, polyline6, 0.3, contour);

            LwPolyline polyline7 = new LwPolyline();
            polyline7.Vertexes.Add(new LwPolylineVertex(v73_1));
            polyline7.Vertexes.Add(new LwPolylineVertex(v2_1));//0
            polyline7.Vertexes[0].Bulge = Math.Tan(19 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline7, 0.3, contour);

            LwPolyline polyline8 = new LwPolyline();
            polyline8.Vertexes.Add(new LwPolylineVertex(v30));
            polyline8.Vertexes.Add(new LwPolylineVertex(v31));
            polyline8.Vertexes.Add(new LwPolylineVertex(v32));
            polyline8.Vertexes.Add(new LwPolylineVertex(v33));
            polyline8.Vertexes.Add(new LwPolylineVertex(v34));
            fun.PolyFill(dxf, polyline8, 0.3, contour);

            LwPolyline polyline9 = new LwPolyline();
            polyline9.Vertexes.Add(new LwPolylineVertex(v35));
            polyline9.Vertexes.Add(new LwPolylineVertex(v36));
            polyline9.Vertexes.Add(new LwPolylineVertex(v37));
            polyline9.Vertexes.Add(new LwPolylineVertex(v38));
            fun.PolyFill(dxf, polyline9, 0.3, contour);

            LwPolyline polyline11 = new LwPolyline();
            polyline11.Vertexes.Add(new LwPolylineVertex(v39));
            polyline11.Vertexes.Add(new LwPolylineVertex(v62));
            polyline11.Vertexes.Add(new LwPolylineVertex(v63));
            polyline11.Vertexes.Add(new LwPolylineVertex(v64));
            fun.PolyFill(dxf, polyline11, 0.3, contour);

            LwPolyline polyline12 = new LwPolyline();
            polyline12.Vertexes.Add(new LwPolylineVertex(v4));
            polyline12.Vertexes.Add(new LwPolylineVertex(v26));
            fun.PolyFill(dxf, polyline12, 0.3, contour);

            LwPolyline pline13 = new LwPolyline();
            pline13.Vertexes.Add(new LwPolylineVertex(v4));
            pline13.Vertexes.Add(new LwPolylineVertex(v26));
            fun.PolyFill(dxf, pline13, 0.3, contour);

            LwPolyline pline14 = new LwPolyline();
            pline14.Vertexes.Add(new LwPolylineVertex(v5));
            pline14.Vertexes.Add(new LwPolylineVertex(v25));
            fun.PolyFill(dxf, pline14, 0.3, contour);

            LwPolyline pline15 = new LwPolyline();
            pline15.Vertexes.Add(new LwPolylineVertex(v6));
            pline15.Vertexes.Add(new LwPolylineVertex(v24));
            fun.PolyFill(dxf, pline15, 0.3, contour);

            LwPolyline pline19 = new LwPolyline();
            pline19.Vertexes.Add(new LwPolylineVertex(v11));
            pline19.Vertexes.Add(new LwPolylineVertex(v17));
            fun.PolyFill(dxf, pline19, 0.3, contour);


            fun.drawcircle(dxf, v28, (0.375 / 15.36) * APMX, 0.3, contour);
            fun.drawcircle(dxf, v29, (0.53 / 15.36) * APMX, 0.3, contour);

            //虚线
            LwPolyline polyline13 = new LwPolyline();
            polyline13.Vertexes.Add(new LwPolylineVertex(v70));
            polyline13.Vertexes.Add(new LwPolylineVertex(v71));
            polyline13.Vertexes.Add(new LwPolylineVertex(v72));
            polyline13.Vertexes.Add(new LwPolylineVertex(v73));
            polyline13.Vertexes.Add(new LwPolylineVertex(v74));
            polyline13.Vertexes.Add(new LwPolylineVertex(v75));
            polyline13.Linetype = Linetype.Dashed;
            polyline13.LinetypeScale = 5;
            polyline13.Layer = refin;
            dxf.AddEntity(polyline13);

            //第二部分
            //轮廓
            LwPolyline polyline14 = new LwPolyline();
            polyline14.Vertexes.Add(new LwPolylineVertex(v43));
            polyline14.Vertexes.Add(new LwPolylineVertex(v44_1));
            polyline14.Vertexes.Add(new LwPolylineVertex(v45_1));
            polyline14.Vertexes.Add(new LwPolylineVertex(v45));
            polyline14.Vertexes.Add(new LwPolylineVertex(v44));
            polyline14.Vertexes.Add(new LwPolylineVertex(v46));
            fun.PolyFill(dxf, polyline14, 0.3, contour);

            LwPolyline polyline15 = new LwPolyline();
            polyline15.Vertexes.Add(new LwPolylineVertex(v43));
            polyline15.Vertexes.Add(new LwPolylineVertex(v47));//0
            polyline15.Vertexes[0].Bulge = Math.Tan(-88 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline15, 0.3, contour);

            LwPolyline polyline16 = new LwPolyline();
            polyline16.Vertexes.Add(new LwPolylineVertex(v48));
            polyline16.Vertexes.Add(new LwPolylineVertex(v49));
            fun.PolyFill(dxf, polyline16, 0.3, contour);

            LwPolyline polyline17 = new LwPolyline();
            polyline17.Vertexes.Add(new LwPolylineVertex(v54));
            polyline17.Vertexes.Add(new LwPolylineVertex(v53));
            polyline17.Vertexes.Add(new LwPolylineVertex(v52));
            polyline17.Vertexes.Add(new LwPolylineVertex(v51));
            polyline17.Vertexes.Add(new LwPolylineVertex(v50));
            polyline17.Vertexes.Add(new LwPolylineVertex(v46_1));
            fun.PolyFill(dxf, polyline17, 0.3, contour);

            LwPolyline polyline18 = new LwPolyline();
            polyline18.Vertexes.Add(new LwPolylineVertex(v54));
            polyline18.Vertexes.Add(new LwPolylineVertex(v55));
            polyline18.Vertexes[0].Bulge = Math.Tan(-88 * pi / 180 / 4);
            fun.PolyFill(dxf, polyline18, 0.3, contour);

            LwPolyline polyline19 = new LwPolyline();
            polyline19.Vertexes.Add(new LwPolylineVertex(v56));
            polyline19.Vertexes.Add(new LwPolylineVertex(v57));
            fun.PolyFill(dxf, polyline19, 0.3, contour);

            var arc1 = fun.DrawArc3(v60, v43, v58);
            fun.drawBArc(dxf, arc1, 0.3, contour);

            var arc2 = fun.DrawArc3(v59, v54, v61);
            fun.drawBArc(dxf, arc2, 0.3, contour);

            //标注---------------------------------------------------------------------------
            double height = 2 * scale;
            double arrowsize = 1 * scale;
            double exline = 0.5 * scale;

            //坐标系
            fun.Axis(dxf, v1, 180, 270, "", "", "PCS", 0.2 * scale, height * 0.5, 0);
            fun.Axis(dxf, fun.Inters(v72, fun.Polar(v72, -90 * pi / 180, OAL), v1, v2), 180, 270, "", "", "MCS", 0.2 * scale, height * 0.5, 0);
            fun.Axis(dxf, v26_1, 180, 270, "Z", "Y", "X", 0.2 * scale, height * 0.5, 0);

            //DCONMS
            fun.dimrot1(dxf, v4, v26, 90, LS * 0.3, 0.1, height, arrowsize, exline, "DCONMS", "", "");

            //LS
            fun.dimrot1(dxf, v27, v25, 180, DCONMS * 2, 0.1, height, arrowsize, exline, "LS", "", "");

            //OAL
            fun.dimrot1(dxf, v3, v16, 0, DCONMS * 3, 0.1, height, arrowsize, exline, "OAL", "", "");

            //LPR
            fun.dimrot1(dxf, v72, v16, 0, DCONMS * 1.5, 0.1, height, arrowsize, exline, "LPR", "", "");

            //LU
            fun.dimrot1(dxf, new Vector2(v6.X + (3.49 / 18.96) * LU, v6.Y), v16, 0, DCONMS * 1, 0.1, height, arrowsize, exline, "LU", "", "");

            //BD
            fun.dimrot1(dxf, v16_2, v21, -90, OAL * 0.15, 0.1, height, arrowsize, exline, "BD", "", "");

            //DC
            fun.dimrot1(dxf, v16, v32, -90, OAL * 0.3, 0.1, height, arrowsize, exline, "DC", "", "");

            //APMX
            fun.dimrot1(dxf, v63, v32, 180, DCONMS, 0.1, height, arrowsize, exline, "APMX", "", "");

            //DN
            fun.dimrot1(dxf, fun.Polar(v6, 0, (3.75 / 6.44) * fun.CalDistance(v6, v7)), fun.Polar(v24, 0, (3.75 / 6.44) * fun.CalDistance(v6, v7)), -90, 0.1, 0.1, height, arrowsize, exline, "DN", "", "");

            //角度标注
            //KAPR
            fun.jdbz2(dxf, new Line(v16, fun.Polar(v16, 90 * pi / 180, 0.1)), new Line(v16, fun.Polar(v16, 180 * pi / 180, 0.1)), DCONMS * 0.8, height, arrowsize, exline, "KAPR", "", "");

            //箭头
            //FDP
            fun.jt1(dxf, v16_1, -90, 5, 1, "FDP", height);

            //CCMS
            fun.jt1(dxf, v4_1, 100, 5, 1, "CCMS", height);

            //A
            fun.jt1(dxf, v76, 0, 5, 1, "A", height);

            //字符
            fun.text(dxf, new Vector2(v44.X - (2.45 / 11.13) * DCONMS, v44.Y + (2.24 / 11.13) * DCONMS), height, "View A");

            //定义格式，根据路径导出
            dxf.DrawingVariables.AcadVer = DxfVersion.AutoCad2007;
            dxf.Save(path);
        }
    }
}
